# coding=utf-8

from docx import Document
from docx.shared import Pt
from docx.shared import Inches
from docx.oxml.ns import qn

import  requests


def crawl(title, answers):
    requests.get()



doca = Document('C:\Users\DUSHA001\Desktop\a.doc')
docb = Document()
answer = []
for p in doca.paragraphs:
    text = p.text.strip()
    if text.startswith('A') or text.startswith('B')or text.startswith('C')or text.startswith('D')or text.startswith('E'):
        answer.append(text[2:])
    elif text[:4].contains('.'):
        title = text[3:40]
        if not answer:
            an = crawl(title, answer)
            docb.add_paragraph(an)
            answer.clear()

    else:
        if not answer:
            crawl(title, answer)
            answer.clear()
            continue
    docb.add_paragraph(text)


    paragraph = docb.add_paragraph(u'我们在做文本测试！')


# 保存文件
docb.save('C:\\Users\\DUSHA001\\Desktop\\b.docx')